home *** CD-ROM | disk | FTP | other *** search
- public class DisciplineHeartOfStone extends Discipline {
- private static final String DISCIPLINE_NAME = "HeartOfStone";
-
- public int cast(int level, int casterGuid) {
- if (!((Discipline)this).CheckCastParameters(level, casterGuid, "HeartOfStone")) {
- return 0;
- } else if (((Discipline)this).Fizzled(level)) {
- ((Discipline)this).DisplayFizzle("HeartOfStone", level);
- return 0;
- } else {
- try {
- int effectGuid = super.casterThing.FindActorEffect("ef_disc_heartofstone");
- if (effectGuid != 0) {
- super.casterThing.ExpandActorEffect(effectGuid, Discipline.HEARTOFSTONE_DURATIONS[level], false);
- ((Discipline)this).DisplayRecast("HeartOfStone", level);
- } else {
- super.casterThing.AddActorEffectByLevel("ef_disc_heartofstone", Discipline.HEARTOFSTONE_DURATIONS[level], level, casterGuid, 4);
- ((Discipline)this).DisplayCast("HeartOfStone", level);
- }
-
- return 1;
- } catch (Exception var5) {
- CodexConsole.PrintException(((Throwable)var5).getMessage() + " in " + "HeartOfStone" + " [cast]");
- return 0;
- } catch (Error var6) {
- CodexConsole.PrintError(((Throwable)var6).getMessage() + " in " + "HeartOfStone" + " [cast]");
- return 0;
- }
- }
- }
- }
-